< previous page page_252 next page >

Page 252
The data control will build a set of records based on either a table name in your database, a query in your database, or even a SELECT SQL statement. Each column in this set of records is then matched up to each control on your form through properties you set in those controls. If the name of the column in the recordset matches the name of the column in your control, the information from the recordset is moved into your control. Figure 12.9 shows how the data moves to and from the data control to the controls on your form.
8160-0252a.gif
Figure 12.9
Data control data movement.
When you place a data control on a form, its able to interact with text boxes, check boxes, and many other data-aware controls. It does this via properties you set on the controls. These controls, once set, inform the data control how to get and set the data they contain.
Moving Through Records with the Data Control
The data control does not look like much at first glance, but it actually gives you a lot of power. After you set just a few properties, the data control can go out to the requested data source and retrieve a set of records. This returned set of records is an ADO Recordset object. You can then move through this set of records by clicking the four record movement areas of this control, as shown in Figure 12.10.
Each time you click one of the record movement buttons, the data control moves to that record in the table. Then the data control retrieves the data from the table and places it in the appropriate controls, based on the properties you set. Before you learn about the properties, lets first look at the concept of a recordset.

 
< previous page page_252 next page >

If you like this book, buy it!